/*
 * FManager.h
 *
 *  Created on : 12/04/2011
 *      Authors: Arthur
 *               Rafael
 *               Roberto
 *               Rubean
 */
#ifndef FMANAGER_H_
#define FMANAGER_H_

/*----------------------------------------------------------------------------*/
/*                            INCLUDES                                        */
/*----------------------------------------------------------------------------*/
#include <FBase.h>
#include <FUi.h>
#include <FApp.h>
#include "FMain.h"
#include "FGame.h"

/*----------------------------------------------------------------------------*/
/*                            DEFINES                                         */
/*----------------------------------------------------------------------------*/
#define		CHECK_AND_DELETE(P)\
	if(P != null){ delete P; P = null;}

#define		DELETE(P)\
	if(P != null){ delete P; P = null;}


/*----------------------------------------------------------------------------*/
/*                            CLASS                                           */
/*----------------------------------------------------------------------------*/
class FManager:
	public  Osp::Ui::Controls::Form
{
public :
	static const int	ID_REQUEST_FORM_MAIN	=	1001;
	static const int	ID_REQUEST_FORM_GAME  =	1002;
	static FManager*  GetInstance(void);
	static  void	    DeleteInstance(void);
	void	            SetFormMain();
	void	            SetFormGame();
	virtual void      OnUserEventReceivedN(RequestId requestId,
			                                  Osp::Base::Collection::IList *pArgs);

private :
	FManager();
	virtual ~FManager();
	result Initialize();

private :
	FMain*					          __pFormMain;
	FGame*				            __pFormGame;
	Osp::Ui::Controls::Frame* __pFrame;
	static FManager*          __pMGR_SINGLETON;

};

#endif /* FMANAGER_H_ */
